<template>
  <div class="modal">
    <el-dialog title="" :width="obj.width" custom-class="myDigo inputTop" :show-close="false" :visible.sync="obj.show">
      <h2>
         <!-- {{ obj.title }}   -->
        <i class="el-icon-close" @click="close" />
      </h2>
      <slot />
    </el-dialog>
  </div>
</template>
<script>
export default {
  name: 'Modal',
  props: {
    disabled: {
      type: Boolean,
      default: false
    },
    obj: {
      show: {
        type: Boolean,
        default: false
      },
      title: {
        type: String,
        default: '友情提示'
      },
      width: {
        type: String,
        default: '500px'
      }
    }
  },
  data() {
    return {
      editor: null
    }
  },
  computed: {

  },
  watch: {

  },
  mounted() {

  },
  destroyed() {

  },
  methods: {
    initEditor() {
      this.editor.on('change', () => {
        this.$emit('input', this.editor.getValue())
      })
    },
    close() {
      this.$emit('close')
      this.obj.show = false
    },
    save() {
      this.$emit('save', false)
    }
  }
}
</script>

<style lang="scss" scoped>
.myDigo h2{background: #343436;font-size: 18px;justify-content: flex-end!important;}
::v-deep .myDigo .el-dialog__footer{background: #E5E9ED;padding-top: 15px;}
::v-deep .el-dialog.myDigo .el-dialog__body{padding: 0;}
::v-deep .el-dialog.myDigo .el-dialog__header{display: none;}
.el-dialog.myDigo h2{height: 58px;display: flex;justify-content: space-between;align-items: center;padding-left: 39px;padding-right: 39px;color: #fff;padding-top: 0;
    margin-top: 0;overflow: hidden;font-size: 18px;font-weight: normal;font-family: 'SourceHanSansSC-regular';}
.el-dialog.myDigo h2 i{font-size: 26px;cursor: pointer;}
::v-deep  .el-dialog.myDigo  .el-dialog__body{text-align: left;}
.formDiv{padding-left: 39px;padding-right: 39px;}
</style>
